<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head th:include="common_include :: commonHead('SVN服务器修改')"/>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <form class="form-horizontal m" id="form-server-edit" th:object="${server}">
                <input type="hidden" name="rowKey" id="rowKey" th:field="*{rowKey}"/>
                <div class="form-group">
                    <label class="col-sm-3 control-label">服务器名称：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" id="serverName" name="serverName" required="true" th:field="*{serverName}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">微服务名称：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" id="serviceName" name="serviceName" required="true" th:field="*{serviceName}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">服务器路径：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" id="serverAddress" name="serverAddress" required="true" th:field="*{serverAddress}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">管理员名称：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" id="adminName" name="adminName" required="true" th:field="*{adminName}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">管理员账号：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="adminAccount" id="svnAccountKey" th:field="*{adminAccount}"/>
                        <input type="text" name="adminAccountDesc" id="svnAccountName" class="form-control" placeholder="管理员账号" th:field="*{adminAccountDesc}" readonly="true" onclick="selectSvnkitUserList()">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">管理员邮箱：</label>
                    <div class="col-sm-8">
                        <input type="hidden" name="sendEmail" id="accountKey" th:field="*{sendEmail}"/>
                        <input type="text" name="sendEmailDesc" id="accountName" class="form-control" placeholder="管理员邮箱" th:field="*{sendEmailDesc}" readonly="true" onclick="selectEmailAccountList()">
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<div th:include="common_include :: commonFoot"/>
<script th:src="@{/libs/service/js/service-email.js}"></script>
<script type="text/javascript">
    var prefix = ctx + "service/svnkit/servers"

    $("#form-server-edit").validate({
        submitHandler: function (form) {
            $.operate.save(prefix + "/edit", $('#form-server-edit').serialize());
        }
    });

    function submitClick() {
        if ($('#form-server-edit').valid()) {
            $('#form-server-edit').submit()
        }
    }
</script>
</body>
</html>
